package stream;

import java.util.stream.Stream;

/**
 * 简介
 * 作者： 李志伟
 * 日期： 2020/4/23
 * 时间： 14:28
 */
public class StreamConcat {


    public static void main(String[] args) {

        Stream<String> stream = Stream.of("张三", "张三丰", "李四", "李小龙");

        Stream<String> stream2 = Stream.of("喜羊羊", "美羊羊", "懒羊羊", "沸羊羊", "暖羊羊");

        // 合并两个流
        Stream<String> newStream = Stream.concat(stream, stream2);

        newStream.forEach(System.out::println);
    }
}
